#!/usr/bin/python3
# coding=utf-8
from pytdx.hq import TdxHq_API
from pytdx.params import TDXParams

api = TdxHq_API()

if api.connect('119.147.212.81', 7709):
    data = api.get_security_count(TDXParams.MARKET_SH) #获取市场股票数量
    print(data)
    api.disconnect()